package com.hzmall.service;

import com.hzmall.common.ServerResponse;
import com.hzmall.pojo.User;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public interface IUserService {
    ServerResponse login(String username, String password);
    ServerResponse register(User user);
    ServerResponse check_valid(String str, String type);
    ServerResponse getUserInfo(User user);
    ServerResponse forgetGetQuestion(String username);
    ServerResponse forgetCheckAnswer(String username, String question, String answer);
    ServerResponse forgetResetPassword(String username, String passwordNew, String forgetToken);
    ServerResponse updateInformation(User user);
    ServerResponse logout(HttpServletRequest request, HttpServletResponse response);
    ServerResponse adminLogin(HttpServletRequest request, String username,HttpSession session,
                         String password,HttpServletResponse response);
    ServerResponse list(Integer pageNum,Integer pageSize);
}
